package com.erclab.internal.xpresso.installer;

import com.erclab.internal.xpresso.exceptions.ApplicationException;

/* This is the abstract class that defines the main algorithm
 * to create a new instance of xpresso.
 * This class makes use the template design pattern.
 * 
 * Enrique Rodriguez. March 2007
 *  
 */
public abstract class XpressoInstaller {

	protected InstallationProperties props;
	
	public XpressoInstaller(InstallationProperties props){
		this.props = props;
	}
	
	public void install() throws ApplicationException{
		backupXpressoDatabase();
		createMetaDatabase();
		createDataDatabase();
		
	}
	
	protected abstract void backupXpressoDatabase() throws ApplicationException;
	protected abstract void createMetaDatabase() throws ApplicationException;
	protected abstract void createDataDatabase() throws ApplicationException;
	protected abstract void copyFiles() throws ApplicationException;
	
	
}
